import { queueWatcher } from '../runtime-core/schduler'
import { isFunction } from '../share'

export default class Watcher {
  #fn = null
  constructor(fn) {
    this.fn = fn
  }
  update() {
    queueWatcher(this)
  }
  run() {
    this.fn()
  }
}
